package qianting.news.apis.services.user;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;
import qianting.news.apis.services.user.fallback.IUserClientFallback;
import qianting.news.common.entity.State;

@FeignClient(value = "user-service",fallback = IUserClientFallback.class)
public interface IUserClient {

    //TODO 需要修改返回值,以免每次都需要通过JSON进行解析
    //根据用户的id查询用户的具体信息
    @GetMapping("/user/api/getUserById")
    public State getUserById(@RequestParam("id") Long id);

}
